package com.yucc.girlimages;

import android.app.Application;
import android.widget.Toast;

import com.umeng.api.sns.UMSnsService;
import com.yucc.girlimages.util.cache.Utils;

public class GirlsApplication extends Application {
	@SuppressWarnings("unused")
	private static final String TAG = "GirlsApplication";

	private Toast mToast;

	public Toast getToast() {
		return mToast;
	}
	
	public void showToast(CharSequence text, int duration){
		mToast.setText(text) ;
		mToast.setDuration(duration) ;
		mToast.show() ;
	}

	public void showToast(int resId, int duration){
		showToast(getResources().getString(resId), duration) ;
	}

	public void showToast(CharSequence text){
		showToast(text, Toast.LENGTH_LONG) ;
	}
	
	public void showToast(int resId){
		showToast(getResources().getString(resId)) ;
	}
	
	
	@Override
	public void onCreate() {
		mToast = Toast.makeText(this, "", Toast.LENGTH_SHORT);
		mToast.setDuration(1000);
		
		UMSnsService.UseLocation=false;
		UMSnsService.LocationAuto=false;
		
		Utils.disableConnectionReuseIfNecessary();
		
	}
}
